In recent years, there have been many practical applications of anomaly detection such as in the areas of predictive maintenance, detection of credit fraud, network intrusion, and system failure. The goal of anomaly detection is to identify anomalous behaviors that are either rare or unseen in training data. For example, predictive maintenance aims to predict an imminent fault in operation of a device (appliance, vehicle, pump, engine, etc.) given abundant samples of normal behavior. Local outlier factor (LOF) is a common density-based anomaly detection method. The predictive performance of LOF depends significantly on a selection of two hyperparameter values: a neighborhood size value and a contamination value for which rule-of-thumb or default values are used with limited success due to variations in optimal or near-optimal values that vary based on the data included in the training data.